all-dynamic:
	rm -rf *.so *.a *.o
	rm -rf ../tinyxml_bin/*.so
	rm -rf ../tinyxml_bin/*.a
	g++ -g -c -fpic -shared *.cpp #-fpic and -shared should be used both, since in some os, it did not support -shared, you should use -fpic to create a portable module.
	g++ -fpic -shared -o libtinyxml.so *.o
	cp -f ./*.so ../tinyxml_bin/ #use -f to force cp to overwrite the file to object.
	cp -f ./libtinyxml.so ../tinyxml_bin/libtinyxml.dll #under cygwin, use dll as the post fix of the dynamic library, but not so, since cygwin will prompt "can not find -ltinyxml". it only find libtinyxml.dll, but not libtinyxml.so #be note, dll should be also in the system path, but not like linux to set the LD_LIBRARY_PATH!!
	cp -f ./*.h ../tinyxml_header/

all-static:
	rm -rf *.so *.a *.o
	rm -rf ../tinyxml_bin/*.so
	rm -rf ../tinyxml_bin/*.a
	g++ -g -c *.cpp
	ar -rc libtinyxml.a *.o
	cp -f ./*.a ../tinyxml_bin/
	cp -f ./*.h ../tinyxml_header/

stl-dynamic:
	rm -rf *.so *.a *.o
	g++ -g -DTIXML_USE_STL -c -fpic *.cpp
	g++ -shared -o libtinyxml.so *.o

stl-static:
	rm -rf *.so *.a *.o
	g++ -g -DTIXML_USE_STL -c *.cpp
	ar -rc libtinyxml.a *.o
clean:
	rm -rf *~
	rm -f *.o
	rm -f *.tqs tca.*
	rm -rf core a.out pchdir
	rm -f *100* .inslog* .i* .z*
	rm -rf *.so *.a *.o
	rm -rf ../tinyxml_bin/*.so
	rm -rf ../tinyxml_bin/*.a

